#!/usr/bin/python3
#description:统计输入的字符的每个单词出现的总个数及该字符串的总数

aa = input("please input some character:")
d = sorted(list(set(aa)))
c = 0
print ("\033[1;31m%s\033[0m" % aa)
for i in d:
    n = aa.count(i)
    print ("\033[1;32m%s\033[0m\t\033[1;35m%s\033[0m" % (d[c],n))
    c = c + 1
print ("Total number of characters: \033[1;34m%s\033[0m" %len(aa))
